<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="root">

</div>
<script>
    function f(row) {
        for (let i = 1; i <= row; i++) {
            for (let j = 1; j <= i; j++) {
                root.innerText += "*"
            }
            root.innerHTML += "<br>"
        }
    }
</script>

</body>
</html>